{template '_header'}


<div class="page-heading"><h2>商户统计</h2> </div>

  <form action="./index.php" method="get" class="form-horizontal table-search" role="form">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="ewei_shopv2" />
                <input type="hidden" name="do" value="web" />
                <input type="hidden" name="r" value="merch.statistics.merch" />
      <div class="page-toolbar row m-b-sm m-t-sm">
          <div class="col-sm-5">
              <div class="btn-group btn-group-sm" style='float:left'>
                  <button class="btn btn-default btn-sm"  type="button" data-toggle='refresh'><i class='fa fa-refresh'></i></button>
              </div>
              {php echo tpl_daterange('datetime', array('sm'=>true,'placeholder'=>'按订单时间查询'),true);}
          </div>
          <div class="col-sm-6 pull-right">
              <select name='groupname'  class='form-control  input-sm select-md'   style="width:120px;">
                  <option value='' {if $_GPC['groupname']==''}selected{/if}>商户组</option>
                  {loop $groups $key $val}
                  <option value='{$val['id']}' {if $_GPC['groupname']==$val['id']}selected{/if}>{$val['groupname']}</option>
                  {/loop}
              </select>
              <div class="input-group">
                  <input type="text" class="form-control input-sm" name="realname" value="{$_GPC['realname']}" placeholder="可搜索商户名称/姓名/手机号"/>
				 <span class="input-group-btn">
                     <button class="btn btn-sm btn-primary" type="submit"> 搜索</button>
                     {ifp 'merch.statistics.merch.export'}
                     <button type="submit" name="export" value="1" class="btn btn-success btn-sm">导出</button>
                     {/if}
				</span>
              </div>

          </div>
      </div>
  </form>

 
        <table class="table table-hover table-responsive">
            <thead class="navbar-inner">
                <tr>
                    <!--<th style="width:25px;"><input type='checkbox' /></th>-->
                    <th style="width:150px;">商城信息</th>
                    <th style="width:120px;">商户信息</th>
                    <th style="width:100px;">订单应收</th>
                    <th style="width:100px;">订单抵扣</th>
                    <th style="width:100px;">订单会员折扣</th>
                    <th style="width:100px;">订单促销</th>
                    <th style="width:100px;">订单实收</th>
                    <!--th style="width:70px;">操作</th-->
                </tr>
            </thead>
            <tbody>
                {loop $list $row}
                <tr>
                   	<!--<td style="position: relative; "><input type='checkbox'   value="{$row['id']}"/></td>-->
                    <td  >
			        <div  >
                    	{if !empty($row['logo'])}
                         <img src='{php echo tomedia($row['logo'])}' style='width:30px;height:30px;padding1px;border:1px solid #ccc' />
                       {/if}
                        {$row['merchname']}
                        </div>
                    </td>
                    <td>{$row['realname']}<br/>{$row['mobile']}</td>
                    
                    <td>{php echo $row['goodsprice']+$row['dispatchprice']}元</td>
                    <td><label class="label label-primary">积分: {php echo floatval($row['deductprice'])}</label>
                        <br/><label class="label label-danger">余额: {php echo floatval($row['deductcredit2'])}</label></td>
                    <td>{$row['discountprice']}</td>
                    <td>{$row['isdiscountprice']}</td>
                    <td>{$row['price']}</td>
                    <td style="overflow:visible;">
                        <!--div class="btn-group btn-group-sm">
                            <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false" href="javascript:;">操作 <span class="caret"></span></a>
                            <ul class="dropdown-menu dropdown-menu-left" role="menu" style='z-index: 9999'>
                                <li><a href="{php echo webUrl('merch/clearing/add',array('merchid' => $row['id'],'datetime[start]'=>$_GPC['datetime']['start'],'datetime[end]'=>$_GPC['datetime']['end']));}" title="生成结算单"><i class='fa fa-edit'></i> 生成结算单</a></li>
                            </ul>
                        </div-->
                    </td>
                </tr>
                {/loop}
            </tbody>
        </table>
           {$pager}
{template '_footer'}